from __clrclasses__.System import Action as _n_0_t_0
from __clrclasses__.System import Func as _n_0_t_1
from __clrclasses__.System import Array as _n_0_t_2
from __clrclasses__.System import ValueType as _n_0_t_3
from __clrclasses__.System import Nullable as _n_0_t_4
from __clrclasses__.System import IAsyncResult as _n_0_t_5
from __clrclasses__.System import IDisposable as _n_0_t_6
from __clrclasses__.System import OperationCanceledException as _n_0_t_7
from __clrclasses__.System import Exception as _n_0_t_8
from __clrclasses__.System import Enum as _n_0_t_9
from __clrclasses__.System import IComparable as _n_0_t_10
from __clrclasses__.System import IFormattable as _n_0_t_11
from __clrclasses__.System import IConvertible as _n_0_t_12
from __clrclasses__.System import AsyncCallback as _n_0_t_13
from __clrclasses__.System import EventHandler as _n_0_t_14
from __clrclasses__.System import EventArgs as _n_0_t_15
from __clrclasses__.System import AggregateException as _n_0_t_16
from __clrclasses__.System.Collections.Concurrent import Partitioner as _n_1_t_0
from __clrclasses__.System.Collections.Concurrent import OrderablePartitioner as _n_1_t_1
from __clrclasses__.System.Collections.Generic import IEnumerable as _n_2_t_0
from __clrclasses__.System.Runtime.InteropServices import _Exception as _n_3_t_0
from __clrclasses__.System.Runtime.Serialization import ISerializable as _n_4_t_0
from __clrclasses__.System.Threading import CancellationToken as _n_5_t_0
from __clrclasses__.System.Threading import IThreadPoolWorkItem as _n_5_t_1
import typing
TResult = typing.TypeVar('TResult')
class ConcurrentExclusiveSchedulerPair(object):
    @property
    def Completion(self) -> Task:"""Completion { get; } -> Task"""
    @property
    def ConcurrentScheduler(self) -> TaskScheduler:"""ConcurrentScheduler { get; } -> TaskScheduler"""
    @property
    def ExclusiveScheduler(self) -> TaskScheduler:"""ExclusiveScheduler { get; } -> TaskScheduler"""
    def __init__(self) -> ConcurrentExclusiveSchedulerPair:...
    def __init__(self, taskScheduler: TaskScheduler) -> ConcurrentExclusiveSchedulerPair:...
    def __init__(self, taskScheduler: TaskScheduler, maxConcurrencyLevel: int) -> ConcurrentExclusiveSchedulerPair:...
    def __init__(self, taskScheduler: TaskScheduler, maxConcurrencyLevel: int, maxItemsPerTask: int) -> ConcurrentExclusiveSchedulerPair:...
    def Complete(self):...
class Parallel(object):
    @staticmethod
    def For(fromInclusive: int, toExclusive: int, body: _n_0_t_0[int]) -> ParallelLoopResult:...
    @staticmethod
    def For(fromInclusive: int, toExclusive: int, parallelOptions: ParallelOptions, body: _n_0_t_0[int]) -> ParallelLoopResult:...
    @staticmethod
    def For(fromInclusive: int, toExclusive: int, localInit: _n_0_t_1[typing.Any], body: _n_0_t_1[int, ParallelLoopState, typing.Any, typing.Any], localFinally: _n_0_t_0[typing.Any]) -> ParallelLoopResult:...
    @staticmethod
    def For(fromInclusive: int, toExclusive: int, parallelOptions: ParallelOptions, localInit: _n_0_t_1[typing.Any], body: _n_0_t_1[int, ParallelLoopState, typing.Any, typing.Any], localFinally: _n_0_t_0[typing.Any]) -> ParallelLoopResult:...
    @staticmethod
    def ForEach(source: _n_2_t_0[typing.Any], parallelOptions: ParallelOptions, body: _n_0_t_0[typing.Any]) -> ParallelLoopResult:...
    @staticmethod
    def ForEach(source: _n_2_t_0[typing.Any], body: _n_0_t_0[typing.Any]) -> ParallelLoopResult:...
    @staticmethod
    def ForEach(source: _n_2_t_0[typing.Any], localInit: _n_0_t_1[typing.Any], body: _n_0_t_1[typing.Any, ParallelLoopState, typing.Any, typing.Any], localFinally: _n_0_t_0[typing.Any]) -> ParallelLoopResult:...
    @staticmethod
    def ForEach(source: _n_2_t_0[typing.Any], parallelOptions: ParallelOptions, localInit: _n_0_t_1[typing.Any], body: _n_0_t_1[typing.Any, ParallelLoopState, typing.Any, typing.Any], localFinally: _n_0_t_0[typing.Any]) -> ParallelLoopResult:...
    @staticmethod
    def ForEach(source: _n_1_t_0[typing.Any], body: _n_0_t_0[typing.Any]) -> ParallelLoopResult:...
    @staticmethod
    def ForEach(source: _n_1_t_1[typing.Any], body: _n_0_t_0[typing.Any, ParallelLoopState, int]) -> ParallelLoopResult:...
    @staticmethod
    def ForEach(source: _n_1_t_0[typing.Any], localInit: _n_0_t_1[typing.Any], body: _n_0_t_1[typing.Any, ParallelLoopState, typing.Any, typing.Any], localFinally: _n_0_t_0[typing.Any]) -> ParallelLoopResult:...
    @staticmethod
    def ForEach(source: _n_1_t_1[typing.Any], localInit: _n_0_t_1[typing.Any], body: _n_0_t_1[typing.Any, ParallelLoopState, int, typing.Any, typing.Any], localFinally: _n_0_t_0[typing.Any]) -> ParallelLoopResult:...
    @staticmethod
    def ForEach(source: _n_1_t_0[typing.Any], parallelOptions: ParallelOptions, body: _n_0_t_0[typing.Any]) -> ParallelLoopResult:...
    @staticmethod
    def ForEach(source: _n_1_t_1[typing.Any], parallelOptions: ParallelOptions, body: _n_0_t_0[typing.Any, ParallelLoopState, int]) -> ParallelLoopResult:...
    @staticmethod
    def ForEach(source: _n_1_t_0[typing.Any], parallelOptions: ParallelOptions, localInit: _n_0_t_1[typing.Any], body: _n_0_t_1[typing.Any, ParallelLoopState, typing.Any, typing.Any], localFinally: _n_0_t_0[typing.Any]) -> ParallelLoopResult:...
    @staticmethod
    def ForEach(source: _n_1_t_1[typing.Any], parallelOptions: ParallelOptions, localInit: _n_0_t_1[typing.Any], body: _n_0_t_1[typing.Any, ParallelLoopState, int, typing.Any, typing.Any], localFinally: _n_0_t_0[typing.Any]) -> ParallelLoopResult:...
    @staticmethod
    def Invoke(actions: _n_0_t_2[_n_0_t_0]):...
    @staticmethod
    def Invoke(parallelOptions: ParallelOptions, actions: _n_0_t_2[_n_0_t_0]):...
class ParallelLoopResult(_n_0_t_3):
    @property
    def IsCompleted(self) -> bool:"""IsCompleted { get; } -> bool"""
    @property
    def LowestBreakIteration(self) -> _n_0_t_4[int]:"""LowestBreakIteration { get; } -> Nullable"""
class ParallelLoopState(object):
    @property
    def IsExceptional(self) -> bool:"""IsExceptional { get; } -> bool"""
    @property
    def IsStopped(self) -> bool:"""IsStopped { get; } -> bool"""
    @property
    def LowestBreakIteration(self) -> _n_0_t_4[int]:"""LowestBreakIteration { get; } -> Nullable"""
    @property
    def ShouldExitCurrentIteration(self) -> bool:"""ShouldExitCurrentIteration { get; } -> bool"""
    def Break(self):...
    def Stop(self):...
class ParallelOptions(object):
    @property
    def CancellationToken(self) -> _n_5_t_0:"""CancellationToken { get; set; } -> CancellationToken"""
    @property
    def MaxDegreeOfParallelism(self) -> int:"""MaxDegreeOfParallelism { get; set; } -> int"""
    @property
    def TaskScheduler(self) -> TaskScheduler:"""TaskScheduler { get; set; } -> TaskScheduler"""
    def __init__(self) -> ParallelOptions:...
class Task(Task, _n_5_t_1, _n_0_t_5, _n_0_t_6, typing.Generic[TResult]):
    @property
    def Result(self) -> TResult:"""Result { get; } -> TResult"""
    def __init__(self, function: _n_0_t_1[TResult]) -> Task:...
    def __init__(self, function: _n_0_t_1[TResult], cancellationToken: _n_5_t_0) -> Task:...
    def __init__(self, function: _n_0_t_1[TResult], creationOptions: TaskCreationOptions) -> Task:...
    def __init__(self, function: _n_0_t_1[TResult], cancellationToken: _n_5_t_0, creationOptions: TaskCreationOptions) -> Task:...
    def __init__(self, function: _n_0_t_1[object, TResult], state: object) -> Task:...
    def __init__(self, function: _n_0_t_1[object, TResult], state: object, cancellationToken: _n_5_t_0) -> Task:...
    def __init__(self, function: _n_0_t_1[object, TResult], state: object, creationOptions: TaskCreationOptions) -> Task:...
    def __init__(self, function: _n_0_t_1[object, TResult], state: object, cancellationToken: _n_5_t_0, creationOptions: TaskCreationOptions) -> Task:...
    def Unwrap(self) -> Task:
        """Extension from: System.Threading.Tasks.TaskExtensions"""
class TaskCanceledException(_n_0_t_7, _n_4_t_0, _n_3_t_0):
    @property
    def Task(self) -> Task:"""Task { get; } -> Task"""
    def __init__(self) -> TaskCanceledException:...
    def __init__(self, message: str) -> TaskCanceledException:...
    def __init__(self, message: str, innerException: _n_0_t_8) -> TaskCanceledException:...
    def __init__(self, task: Task) -> TaskCanceledException:...
class TaskCompletionSource(typing.Generic[TResult]):
    @property
    def Task(self) -> Task[TResult]:"""Task { get; } -> Task"""
    def __init__(self) -> TaskCompletionSource:...
    def __init__(self, state: object, creationOptions: TaskCreationOptions) -> TaskCompletionSource:...
    def __init__(self, creationOptions: TaskCreationOptions) -> TaskCompletionSource:...
    def __init__(self, state: object) -> TaskCompletionSource:...
    def SetCanceled(self):...
    def SetException(self, exception: _n_0_t_8):...
    def SetException(self, exceptions: _n_2_t_0[_n_0_t_8]):...
    def SetResult(self, result: TResult):...
    def TrySetCanceled(self) -> bool:...
    def TrySetCanceled(self, cancellationToken: _n_5_t_0) -> bool:...
    def TrySetException(self, exception: _n_0_t_8) -> bool:...
    def TrySetException(self, exceptions: _n_2_t_0[_n_0_t_8]) -> bool:...
    def TrySetResult(self, result: TResult) -> bool:...
class TaskContinuationOptions(_n_0_t_9, _n_0_t_10, _n_0_t_11, _n_0_t_12):
    AttachedToParent: int
    DenyChildAttach: int
    ExecuteSynchronously: int
    HideScheduler: int
    LazyCancellation: int
    LongRunning: int
    _None: int
    NotOnCanceled: int
    NotOnFaulted: int
    NotOnRanToCompletion: int
    OnlyOnCanceled: int
    OnlyOnFaulted: int
    OnlyOnRanToCompletion: int
    PreferFairness: int
    RunContinuationsAsynchronously: int
    value__: int
class TaskCreationOptions(_n_0_t_9, _n_0_t_10, _n_0_t_11, _n_0_t_12):
    AttachedToParent: int
    DenyChildAttach: int
    HideScheduler: int
    LongRunning: int
    _None: int
    PreferFairness: int
    RunContinuationsAsynchronously: int
    value__: int
class TaskExtensions(object):
    @staticmethod
    def Unwrap(task: Task[Task]) -> Task:...
class TaskFactory(typing.Generic[TResult]):
    @property
    def CancellationToken(self) -> _n_5_t_0:"""CancellationToken { get; } -> CancellationToken"""
    @property
    def ContinuationOptions(self) -> TaskContinuationOptions:"""ContinuationOptions { get; } -> TaskContinuationOptions"""
    @property
    def CreationOptions(self) -> TaskCreationOptions:"""CreationOptions { get; } -> TaskCreationOptions"""
    @property
    def Scheduler(self) -> TaskScheduler:"""Scheduler { get; } -> TaskScheduler"""
    def __init__(self) -> TaskFactory:...
    def __init__(self, cancellationToken: _n_5_t_0) -> TaskFactory:...
    def __init__(self, scheduler: TaskScheduler) -> TaskFactory:...
    def __init__(self, creationOptions: TaskCreationOptions, continuationOptions: TaskContinuationOptions) -> TaskFactory:...
    def __init__(self, cancellationToken: _n_5_t_0, creationOptions: TaskCreationOptions, continuationOptions: TaskContinuationOptions, scheduler: TaskScheduler) -> TaskFactory:...
    def ContinueWhenAll(self, tasks: _n_0_t_2[Task], continuationFunction: _n_0_t_1[_n_0_t_2[Task], TResult]) -> Task[TResult]:...
    def ContinueWhenAll(self, tasks: _n_0_t_2[Task], continuationFunction: _n_0_t_1[_n_0_t_2[Task], TResult], cancellationToken: _n_5_t_0) -> Task[TResult]:...
    def ContinueWhenAll(self, tasks: _n_0_t_2[Task], continuationFunction: _n_0_t_1[_n_0_t_2[Task], TResult], continuationOptions: TaskContinuationOptions) -> Task[TResult]:...
    def ContinueWhenAll(self, tasks: _n_0_t_2[Task], continuationFunction: _n_0_t_1[_n_0_t_2[Task], TResult], cancellationToken: _n_5_t_0, continuationOptions: TaskContinuationOptions, scheduler: TaskScheduler) -> Task[TResult]:...
    def ContinueWhenAny(self, tasks: _n_0_t_2[Task], continuationFunction: _n_0_t_1[Task, TResult]) -> Task[TResult]:...
    def ContinueWhenAny(self, tasks: _n_0_t_2[Task], continuationFunction: _n_0_t_1[Task, TResult], cancellationToken: _n_5_t_0) -> Task[TResult]:...
    def ContinueWhenAny(self, tasks: _n_0_t_2[Task], continuationFunction: _n_0_t_1[Task, TResult], continuationOptions: TaskContinuationOptions) -> Task[TResult]:...
    def ContinueWhenAny(self, tasks: _n_0_t_2[Task], continuationFunction: _n_0_t_1[Task, TResult], cancellationToken: _n_5_t_0, continuationOptions: TaskContinuationOptions, scheduler: TaskScheduler) -> Task[TResult]:...
    def FromAsync(self, asyncResult: _n_0_t_5, endMethod: _n_0_t_1[_n_0_t_5, TResult]) -> Task[TResult]:...
    def FromAsync(self, asyncResult: _n_0_t_5, endMethod: _n_0_t_1[_n_0_t_5, TResult], creationOptions: TaskCreationOptions) -> Task[TResult]:...
    def FromAsync(self, asyncResult: _n_0_t_5, endMethod: _n_0_t_1[_n_0_t_5, TResult], creationOptions: TaskCreationOptions, scheduler: TaskScheduler) -> Task[TResult]:...
    def FromAsync(self, beginMethod: _n_0_t_1[_n_0_t_13, object, _n_0_t_5], endMethod: _n_0_t_1[_n_0_t_5, TResult], state: object) -> Task[TResult]:...
    def FromAsync(self, beginMethod: _n_0_t_1[_n_0_t_13, object, _n_0_t_5], endMethod: _n_0_t_1[_n_0_t_5, TResult], state: object, creationOptions: TaskCreationOptions) -> Task[TResult]:...
    def FromAsync(self, beginMethod: _n_0_t_1[typing.Any, _n_0_t_13, object, _n_0_t_5], endMethod: _n_0_t_1[_n_0_t_5, TResult], arg1: typing.Any, state: object) -> Task[TResult]:...
    def FromAsync(self, beginMethod: _n_0_t_1[typing.Any, _n_0_t_13, object, _n_0_t_5], endMethod: _n_0_t_1[_n_0_t_5, TResult], arg1: typing.Any, state: object, creationOptions: TaskCreationOptions) -> Task[TResult]:...
    def FromAsync(self, beginMethod: _n_0_t_1[typing.Any, typing.Any, _n_0_t_13, object, _n_0_t_5], endMethod: _n_0_t_1[_n_0_t_5, TResult], arg1: typing.Any, arg2: typing.Any, state: object) -> Task[TResult]:...
    def FromAsync(self, beginMethod: _n_0_t_1[typing.Any, typing.Any, _n_0_t_13, object, _n_0_t_5], endMethod: _n_0_t_1[_n_0_t_5, TResult], arg1: typing.Any, arg2: typing.Any, state: object, creationOptions: TaskCreationOptions) -> Task[TResult]:...
    def FromAsync(self, beginMethod: _n_0_t_1[typing.Any, typing.Any, typing.Any, _n_0_t_13, object, _n_0_t_5], endMethod: _n_0_t_1[_n_0_t_5, TResult], arg1: typing.Any, arg2: typing.Any, arg3: typing.Any, state: object) -> Task[TResult]:...
    def FromAsync(self, beginMethod: _n_0_t_1[typing.Any, typing.Any, typing.Any, _n_0_t_13, object, _n_0_t_5], endMethod: _n_0_t_1[_n_0_t_5, TResult], arg1: typing.Any, arg2: typing.Any, arg3: typing.Any, state: object, creationOptions: TaskCreationOptions) -> Task[TResult]:...
    def StartNew(self, function: _n_0_t_1[TResult]) -> Task[TResult]:...
    def StartNew(self, function: _n_0_t_1[TResult], cancellationToken: _n_5_t_0) -> Task[TResult]:...
    def StartNew(self, function: _n_0_t_1[TResult], creationOptions: TaskCreationOptions) -> Task[TResult]:...
    def StartNew(self, function: _n_0_t_1[TResult], cancellationToken: _n_5_t_0, creationOptions: TaskCreationOptions, scheduler: TaskScheduler) -> Task[TResult]:...
    def StartNew(self, function: _n_0_t_1[object, TResult], state: object) -> Task[TResult]:...
    def StartNew(self, function: _n_0_t_1[object, TResult], state: object, cancellationToken: _n_5_t_0) -> Task[TResult]:...
    def StartNew(self, function: _n_0_t_1[object, TResult], state: object, creationOptions: TaskCreationOptions) -> Task[TResult]:...
    def StartNew(self, function: _n_0_t_1[object, TResult], state: object, cancellationToken: _n_5_t_0, creationOptions: TaskCreationOptions, scheduler: TaskScheduler) -> Task[TResult]:...
class TaskScheduler(object):
    @property
    def Current(self) -> TaskScheduler:"""Current { get; } -> TaskScheduler"""
    @property
    def Default(self) -> TaskScheduler:"""Default { get; } -> TaskScheduler"""
    @property
    def Id(self) -> int:"""Id { get; } -> int"""
    @property
    def MaximumConcurrencyLevel(self) -> int:"""MaximumConcurrencyLevel { get; } -> int"""
    @property
    def UnobservedTaskException(self) -> _n_0_t_14[UnobservedTaskExceptionEventArgs]:
        """UnobservedTaskException Event: EventHandler"""
    @staticmethod
    def FromCurrentSynchronizationContext() -> TaskScheduler:...
class TaskSchedulerException(_n_0_t_8, _n_4_t_0, _n_3_t_0):
    def __init__(self) -> TaskSchedulerException:...
    def __init__(self, message: str) -> TaskSchedulerException:...
    def __init__(self, innerException: _n_0_t_8) -> TaskSchedulerException:...
    def __init__(self, message: str, innerException: _n_0_t_8) -> TaskSchedulerException:...
class TaskStatus(_n_0_t_9, _n_0_t_10, _n_0_t_11, _n_0_t_12):
    Canceled: int
    Created: int
    Faulted: int
    RanToCompletion: int
    Running: int
    value__: int
    WaitingForActivation: int
    WaitingForChildrenToComplete: int
    WaitingToRun: int
class UnobservedTaskExceptionEventArgs(_n_0_t_15):
    @property
    def Exception(self) -> _n_0_t_16:"""Exception { get; } -> AggregateException"""
    @property
    def Observed(self) -> bool:"""Observed { get; } -> bool"""
    def __init__(self, exception: _n_0_t_16) -> UnobservedTaskExceptionEventArgs:...
    def SetObserved(self):...
